home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH6 / 6-3-2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-18  |  2.4 KB  |  83 lines

  1. VERSION 5.00
  2. Begin VB.Form frm6_3_2 
  3.    Caption         =   "For index = 0 To n Step s"
  4.    ClientHeight    =   1710
  5.    ClientLeft      =   1050
  6.    ClientTop       =   1770
  7.    ClientWidth     =   3390
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   1710
  20.    ScaleWidth      =   3390
  21.    Begin VB.PictureBox picValues 
  22.       Height          =   255
  23.       Left            =   120
  24.       ScaleHeight     =   195
  25.       ScaleWidth      =   3075
  26.       TabIndex        =   5
  27.       Top             =   1320
  28.       Width           =   3135
  29.    End
  30.    Begin VB.CommandButton cmdDisplay 
  31.       Caption         =   "Display Values of index"
  32.       Height          =   495
  33.       Left            =   120
  34.       TabIndex        =   4
  35.       Top             =   600
  36.       Width           =   3135
  37.    End
  38.    Begin VB.TextBox txtStep 
  39.       Height          =   285
  40.       Left            =   2040
  41.       TabIndex        =   3
  42.       Top             =   120
  43.       Width           =   735
  44.    End
  45.    Begin VB.TextBox txtEnd 
  46.       Height          =   285
  47.       Left            =   840
  48.       TabIndex        =   1
  49.       Top             =   120
  50.       Width           =   735
  51.    End
  52.    Begin VB.Label lblS 
  53.       Caption         =   "s:"
  54.       Height          =   375
  55.       Left            =   1800
  56.       TabIndex        =   2
  57.       Top             =   120
  58.       Width           =   255
  59.    End
  60.    Begin VB.Label lblN 
  61.       Caption         =   "n:"
  62.       Height          =   375
  63.       Left            =   600
  64.       TabIndex        =   0
  65.       Top             =   120
  66.       Width           =   255
  67.    End
  68. Attribute VB_Name = "frm6_3_2"
  69. Attribute VB_GlobalNameSpace = False
  70. Attribute VB_Creatable = False
  71. Attribute VB_PredeclaredId = True
  72. Attribute VB_Exposed = False
  73. Private Sub cmdDisplay_Click()
  74.   Dim n As Single, s As Single, index As Single
  75.   'Display values of index ranging from 0 to n Step s
  76.   picValues.Cls
  77.   n = Val(txtEnd.Text)
  78.   s = Val(txtStep.Text)
  79.   For index = 0 To n Step s
  80.     picValues.Print index;
  81.   Next index
  82. End Sub
  83.